package com.renren.project.db.validator.account;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Documented
@Constraint(validatedBy = {AccountValidationImpl.class})
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR,
    ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface AccountValidation {

    boolean required() default true;

    int verifyType() default 0;// 验证类型

    String message() default "登录账号格式错误";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
